package top.mengchaob.exception;

import org.slf4j.Logger;

import java.io.PrintStream;
import java.io.PrintWriter;

/**
 * @title：
 * @author: mengchaob
 * @date: 2021年05月31日 15:19
 * @description:
 */
public class BaseException extends Exception {
    protected  Logger logger = null;
    public BaseException(){
        super();
    }
    public BaseException(String info){
        super(info);
    }

    @Override
    public void printStackTrace() {
        super.printStackTrace();
        logger.error(this.getMessage());
    }

    @Override
    public void printStackTrace(PrintStream s) {
        super.printStackTrace(s);
        logger.error(this.getMessage());
    }

    @Override
    public void printStackTrace(PrintWriter s) {
        super.printStackTrace(s);
        logger.error(this.getMessage());
    }
}
